package org.jeecg.modules.cosmetic.constant.enums;

import org.apache.commons.lang.StringUtils;
import org.jeecg.modules.cosmetic.constant.ExplainConstants;

/**
 * @author scx
 * @date 2022/7/13 6:13 下午
 */
public enum FixedMaterialEnum {

    WATER("06260", ExplainConstants.A_WATER_APPRAISAL_CONCLUSION),
    ESSENCE("07007",ExplainConstants.A_ESSENCE_APPRAISAL_CONCLUSION),
    ;

    private String serial;

    private String msg;

    FixedMaterialEnum(String serial, String msg) {
        this.serial = serial;
        this.msg = msg;
    }

    public static String getFixedMaterialEnumBySerial(String serialNum){
        if (StringUtils.isEmpty(serialNum)){
            return null;
        }
        for (FixedMaterialEnum val: FixedMaterialEnum.values()){
            if (val.serial.equals(serialNum)){
                return val.getMsg();
            }
        }
        return null;
    }

    public String getSerial() {
        return serial;
    }

    public void setSerial(String serial) {
        this.serial = serial;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
